<template>
  <div class="custom-body" :style="borderStyle">
    <!--  模版头  -->
    <default-column-header v-if="showHeader" :temp="temp" />
    <el-empty
      v-if="dataList === null || dataList.length === 0"
      class="custom-right"
      :image-size="100"
    />
    <div v-else class="custom-right">
      <div
        v-for="(item, index) in dataList"
        :key="'li-' + index"
        class="custom-ul-li"
        :style="liStyle"
      >
        <div
          class="custom-ul-body"
          @click="callBack(item)"
        >
          <div class="custom-li-image">
            <el-image :src="baseURL + item.tb" />
          </div>
          <div class="custom-li-right">
            <div class="custom-li-line">
              <span
                :style="{
                  color: item.fontColor,
                  fontSize: item.fontSize + 'px',
                  fontWeight: '600'
                }"
              >
                <statistics-slot :ids="item.sjly.id" :column="item.number" />
              </span>
              <span
                :style="{
                  color: item.titleColor,
                  fontSize: item.titleFontSize + 'px'
                }"
              >{{ item.label }}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import StatisticsSlot from './slot/statistics'
import DefaultColumnHeader from '@/portal4.1/pc/component/column/DefaultColumnHeader.vue'
import { layout } from '@/mixins/layout'
import { statisticsTemp } from '@/mixins/template'
export default {
  name: 'PortalNewPcStatisticsV4', // 统计模块
  components: { DefaultColumnHeader, StatisticsSlot },
  mixins: [layout, statisticsTemp]
}
</script>

<style scoped>
.custom-body {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 4px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-flow: column nowrap;
}
.custom-right {
  width: 100%;
  flex: 1 1;
}
.custom-ul-li {
  flex: 0 1 auto;
  padding: 15px;
  box-sizing: border-box;
  height: 100%;
}
.custom-ul-li:not(:last-child) .custom-ul-body{
  border-bottom: 1px solid #f7f7f7;
}
.custom-ul-body {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  position: relative;
  box-sizing: border-box;
}
.custom-li-image {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 50%;
  margin-top: -25px;
  left: 15px;
}
.custom-li-right {
  flex: 1 1 auto;
  height: 100%;
  padding-left: 55px;
  box-sizing: border-box;
  position: relative;
}
.custom-li-line {
  position: absolute;
  left: 0px;
  right: 0px;
  height: 50px;
  top: 50%;
  margin-top: -25px;
  text-align: center;
}
.custom-li-line span {
  width: 100%;
  height: 25px;
  line-height: 25px;
  text-align: center;
}
</style>
